home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 November / Ahoy_Magazine_85-11_1985_Double_L.d64 / border interrupt (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  790b  |  18 lines

  1. 0 print"[147]":poke53280,0:poke53281,6:poke646,1
  2. 1 print"programming in the irq interrupt"
  3. 7 print"run this program,then type characters in upper lefthand corner of screen"
  4. 8 print"the border color will change, depending on screen code of character"
  5. 9 print"13-byte program sets up the interrupt: 11-byte program runs it"
  6. 10 for i=5011 to 5023:read a:poke i,a:next
  7. 20 for i=5000 to 5010:read a:poke i,a:next
  8. 30 sys 5011
  9. 40 end
  10. 47 rem  *** sys call to set interrupt vector
  11. 48 rem block interrupts, set vector address (low, high), enable interrupts
  12. 49 rem  sei lda#136 sta 788  lda#19 sta 789 cli rts
  13. 50 data 120,169,136,141,20,3,169,19,141,21,3,88,96
  14. 57 rem  *** actual interrupt routine
  15. 58 rem get first screen character; use low nybble to set border color
  16. 59 rem lda 1024 and#15 sta 53280 jmp 59953
  17. 60 data 173,0,4,41,31,141,32,208,76,49,234
  18.